import { $delete, $get } from '@js/authRequest'

// 获取秘书列表
export async function getConfigListRequest (v) {
  const res = await $get('/api/common/dictionary/getByType', {
    type: v
  })
  if (res.status !== 1) {
    throw new Error(res.message)
  }
  return res.data
}

// 擅除配置项
export async function delConfigRequest (data) {
  const id = data.id
  delete data.id
  const res = await $delete(`/api/common/dictionary/${id}`, data)
  if (res.status !== 1) {
    throw new Error(res.message)
  }
  return res.data
}
